/*************************************************
 * 描述：多选下拉弹窗
 *
 * File：cximuticmbpop.h
 * Author：zhangzhiming@mozihealthcare.cn
 * Date：25-9-5
 * Update：
 * ************************************************/
#ifndef CXIMUTICMBPOP_H
#define CXIMUTICMBPOP_H
#include "controls/combo/cximuticomb.h"
#include <QCheckBox>
#include <QFrame>
#include <QHBoxLayout>
#include <QLineEdit>
#include <QListWidget>
#include <QPushButton>

class CxiMutiCmbPop : public QFrame
{
	Q_OBJECT
public:
	explicit CxiMutiCmbPop(QWidget* parent = 0);
	~CxiMutiCmbPop();
	void addItem(const MutiItem& item) const;

	QLineEdit* searchLineEdit;
	QCheckBox* selectAll;
	QListWidget* listWidget;
	QHBoxLayout* searchBar;
signals:
	void stateChanged();
private slots:
	void onSearch(const QString& search);
	void onToggleSelectAll(int state);
	void onItemClicked(QListWidgetItem* item);
	void onItemChanged(QListWidgetItem* item);

private:
	void init();
	void initTopSearchBar();
	void initBottomView();
};


#endif//CXIMUTICMBPOP_H
